require(ggplot2)
<- data.frame(x=seq(1,50))
df <- 1:50
x <- ggplot(df, aes(x=x))
p for(i in 1:8){
= local({
p <- i
j <- (1+0.01*j)^x
y + geom_line(aes(y=y, color=as.character(j)),
p linewidth=1) +
annotate("text",
label = 0.01*j,
size=2,
x=50, y=(1+0.01*j)^50,
hjust = -.3)
}
)
}
+ scale_color_brewer(
p palette = "Spectral") +
theme_classic()+
scale_x_continuous(limits=c(0,55))+
theme(legend.position = "None") +
labs(x="Year", y="Total")